package com.farm.monitor;

// 具体观察者 - 温度监控器
public class TemperatureMonitor implements SensorObserver {
    @Override
    public void update(EnvironmentSensor sensor) {
        System.out.println("温度监控器: 当前温度 = " + sensor.getTemperature() + "°C");
        if (sensor.getTemperature() > 30) {
            System.out.println("警告: 温度过高!");
            System.out.println("11");
        }
    }
}
